#ifndef _TEC34725_H
#define _TEC34725_H

#include "delay.h"
#include "stm32f4xx_hal.h"

typedef struct{
	unsigned short  c;      //[0-65536]
	unsigned short  r;
	unsigned short  g;
	unsigned short  b;
}COLOR_RGBC;//RGBC

typedef struct{
	unsigned short h;       //[0,360]
	unsigned char  s;       //[0,100]
	unsigned char  l;       //[0,100]
}COLOR_HSL;//HSL

#define u32	uint32_t
#define u16	uint16_t
#define u8	uint8_t

extern COLOR_RGBC rgb;
extern COLOR_HSL  hsl;

u8 TCS34725_Init(void);
void TCS34725_I2C_Init(void);
void RGBtoHSL(COLOR_RGBC *Rgb, COLOR_HSL *Hsl);
u8 TCS34725_GetRawData(COLOR_RGBC *rgbc);

//#include "sys.h"
#endif
